<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  
</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <jsp:include page="/WEB-INF/include/submenu-session.jsp">
    <jsp:param name="currentUrl" value="${ctx.host}/sessions/${session.id}" />
  </jsp:include>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-content-layout has-operation">

      <div class="ihg-breadcrumb">
        <ol class="breadcrumb border-breadcrumb  no-bottom-border">
          <li class="active"><fmt:message key="assessor.369" /></li>
        </ol>
        <c:if test="${empty subgroup}">
          <div class="pull-right">
            <a href="${ctx.host}/sessions/${sessionId}/day-two-summary" style="color: #155CB2;font-size: 16px;"><<&nbsp;<fmt:message key="assessor.376" /></a>
          </div>
        </c:if>
      </div>
      
      <p style="font-size: 18px; color: #707372; margin-bottom: 0;"><fmt:message key="assessor.374" /><span class="color-red">15:45</span><fmt:message key="assessor.375" /> </p>

      <a href="javascript:void(0)" data-href="${sessionMeeting.conferenceRoom.url}" class="btn btn-danger zoomlink-btn" style="margin-top: 10px;width: 260px;height: 50px;font-size: 18px;line-height: 36px;">
        <fmt:message key="assessor.477" />
      </a>
      
      <table class="table ihg-table peer-calibration-table" style="border-bottom: 1px solid #D45F16; margin-top: 10px;">
        <thead style="border-top: 2px solid #D45F16;">
          <tr>
            <th style="min-width: 330px; text-align: left;"><fmt:message key="assessor.377" /></th>
            <th style="min-width: 200px; text-align: left;"><fmt:message key="assessor.378" /></th>
            <th style="min-width: 140px; max-width: 200px; text-align: center;"><fmt:message key="assessor.379" /></th>
            <th style="min-width: 140px; max-width: 170px; text-align: center;"><fmt:message key="assessor.380" /></th>
            <th><fmt:message key="assessor.381" /></th>
          </tr>
        </thead>
        
        <tbody>
          <c:forEach var="sessionCalibration" items="${sessionCalibrations}">
            <tr>
              <td>
                <div class="delegate-avater" style="background-color: #F4F2ED; display: inline-block; width: 100px; height: 100px; vertical-align: middle;"><img src="${sessionCalibration.delegate.avatar}"></div>
                <div class="delegate-information text-left" style="width: 185px; display: inline-block; margin-left: 10px; vertical-align: middle;">
                  <strong><fmt:message key="assessor.382" /> ${sessionCalibration.delegate.name}</strong>
                  <p><fmt:message key="assessor.238" />${sessionCalibration.delegate.telephone}<br>
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/career-work?delegate=${sessionCalibration.delegate.id}" target="_blank"><fmt:message key="assessor.383" /></a><br/>
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/exercise-notes" data-target="#viewExerciseNotes" data-toggle="modal"><fmt:message key="assessor.405" /></a>
                  </p><br>
                  <strong><fmt:message key="assessor.384" />${sessionCalibration.leadAssessor.name}</strong>
                  <p><fmt:message key="assessor.238" /> ${sessionCalibration.leadAssessor.telephone}</p>
                </div>
              </td>
              <td  class="strength-area">
                <c:set var="competency" value="${sessionCalibrationCompetencies[sessionCalibration.idString]}"/>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/lead-and-develop" class="anchor"><fmt:message key="competency.name.5" /></a>
                  <span class="label label-${competency['Lead And Development'].status.finish ? competency['Lead And Development'].score.dn ? 'weakness' : competency['Lead And Development'].score.c ? 'common' : 'strength' :'default'}">${competency['Lead And Development'].status.finish ? competency['Lead And Development'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/drive-result" class="anchor"><fmt:message key="competency.name.1" /></a>
                  <span class="label label-${competency['Drive Result'].status.finish ? competency['Drive Result'].score.dn ? 'weakness' : competency['Drive Result'].score.c ? 'common' : 'strength' :'default'}">${competency['Drive Result'].status.finish ? competency['Drive Result'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/work-collaboratively" class="anchor"><fmt:message key="competency.name.2" /></a>
                  <span class="label label-${competency['Work Collaboratively'].status.finish ? competency['Work Collaboratively'].score.dn ? 'weakness' : competency['Work Collaboratively'].score.c ? 'common' : 'strength' :'default'}">${competency['Work Collaboratively'].status.finish ? competency['Work Collaboratively'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/champion-change" class="anchor"><fmt:message key="competency.name.4" /></a>
                  <span class="label label-${competency['Champion Change'].status.finish ? competency['Champion Change'].score.dn ? 'weakness' : competency['Champion Change'].score.c ? 'common' : 'strength' :'default'}">${competency['Champion Change'].status.finish ? competency['Champion Change'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/owner-relations" class="anchor">业主关系</a>
                  <span class="label label-${competency['Owner Relations'].status.finish ? competency['Owner Relations'].score.dn ? 'weakness' : competency['Owner Relations'].score.c ? 'common' : 'strength' :'default'}">${competency['Owner Relations'].status.finish ? competency['Owner Relations'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/operations-management" class="anchor">运营管理</a>
                  <span class="label label-${competency['Operations Management'].status.finish ? competency['Operations Management'].score.dn ? 'weakness' : competency['Operations Management'].score.c ? 'common' : 'strength' :'default'}">${competency['Operations Management'].status.finish ? competency['Operations Management'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/revenue-maximisation" class="anchor">收益最大化</a>
                  <span class="label label-${competency['Revenue Maximisation'].status.finish ? competency['Revenue Maximisation'].score.dn ? 'weakness' : competency['Revenue Maximisation'].score.c ? 'common' : 'strength' :'default'}">${competency['Revenue Maximisation'].status.finish ? competency['Revenue Maximisation'].score.alias : '?'}</span>
                </div>
                <div class="text-left">
                  <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/financial-management" class="anchor"><fmt:message key="competency.name.6" /></a>
                  <span class="label label-${competency['Financial Management'].status.finish ? competency['Financial Management'].score.dn ? 'weakness' : competency['Financial Management'].score.c ? 'common' : 'strength' :'default'}">${competency['Financial Management'].status.finish ? competency['Financial Management'].score.alias : '?'}</span>
                </div>
              </td>
              <td>
                <c:set var="commentUrl" value="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/overall-advantage-disadvantage-choose?subgroup=${subgroup}"/>
                <a href="${supervisor ? 'javascript:void(0);' : commentUrl}">
                  <img src="${ctx.resource}/images/${sessionCalibrationComments[sessionCalibration.idString].status.finish ? 'calibration-completed' : 'calibration-to-be-completed'}.png">
                </a>
              </td>
              <td class="readiness-recommendation">
                <div class="text-center">
                  <c:set var="recommendationUrl" value="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/overall-comments?subgroup=${subgroup}"/>
                  <c:choose>
                    <c:when test="${not empty sessionCalibrationRecommendations[sessionCalibration.idString]}">
                      <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].simpleHotel}">
                        <a href="${supervisor ? 'javascript:void(0);' : recommendationUrl}"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].simpleHotelResult.message}" /> for <fmt:message key="assessor.440" /></a>
                      </c:if>
                      <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].averageHotel}">
                        <a href="${supervisor ? 'javascript:void(0);' : recommendationUrl}"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].averageHotelResult.message}" /> for <fmt:message key="assessor.439" /></a>
                      </c:if>
                      <c:if test="${sessionCalibrationRecommendations[sessionCalibration.idString].complexHotel}">
                        <a href="${supervisor ? 'javascript:void(0);' : recommendationUrl}"><fmt:message key="${sessionCalibrationRecommendations[sessionCalibration.idString].complexHotelResult.message}" /> for <fmt:message key="assessor.438" /></a>
                      </c:if>
                    </c:when>
                    <c:otherwise>
                      <a href="${supervisor ? 'javascript:void(0);' : recommendationUrl}">
                        <img src="${ctx.resource}/images/calibration-to-be-completed.png">
                      </a>
                    </c:otherwise>
                  </c:choose>
                </div>
              </td>
              <td>
                <c:choose>
                  <c:when test="${not empty reportSubmitStatus && reportSubmitStatus[sessionCalibration.delegate.id].finish}">
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/report-writing?subgroup=${subgroup}" class="btn btn-default" style="width: 90px;background: #55951B; color: #fff;"> <fmt:message key="assessor.381" /><br><fmt:message key="assessor.385-5"/></a>
                  </c:when>
                  <c:when test="${reportTaskStatus[sessionCalibration.delegate.id].finish}">
                    <a href="${ctx.host}/sessions/${session.id}/peer-calibrations/${sessionCalibration.id}/report-writing?subgroup=${subgroup}" class="btn btn-default" style="width: 90px;background: #3CAED6; color: #fff;"> <fmt:message key="assessor.385" /><br><fmt:message key="assessor.381" /></a>
                  </c:when>
                  <c:otherwise>
                    <a href="javascript:void(0);" class="btn btn-default" style="width: 90px;"> <fmt:message key="assessor.385" /><br><fmt:message key="assessor.381" /></a>
                  </c:otherwise>
                </c:choose>
              </td>
            </tr>
          </c:forEach>
        </tbody>
      </table>

    </div>
  </div>
  
  <c:if test="${param.formlink == 'true'}">
    <div class="modal fade" tabindex="-1" role="dialog" id="zoomLink">
      <div class="modal-dialog" role="document" style="position: absolute; width: 500px; left: 50%; top: 50%; transform: translate(-50%, -50%)">
        <div class="modal-content">
          <button type="button" class="close" style="position: absolute; top: 5px; right: 10px;font-size: 30px; z-index: 1;" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <div class="modal-body text-center" style="font-size: 15px; padding-bottom: 30px;">
            <p class="no-margin">开始总结前，请点击下方按钮进入会议室。</p>
            <a href="javascript:void(0)" data-href="${sessionMeeting.conferenceRoom.url}" class="btn btn-danger zoomlink-btn" style="margin-top: 10px;width: 260px;height: 80px;font-size: 20px;line-height: 66px;">点击进入会议</a>
            <p style="margin-top: 10px; margin-bottom: 0px;">Join by phone</p>
            <p class="no-margin">+86-400-810-4729 China Toll</p>
            <p class="no-margin">Access Code: ${sessionMeeting.conferenceRoom.account} #</p>
          </div>
        </div>
      </div>
    </div>
  </c:if>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/during/peer-calibration/peer-calibration-list.js" />
  <script type="text/javascript">
    require([ 'page/session/during/peer-calibration/peer-calibration-list' ], function(page) {
      page.init();
    })
  </script>

</body>
</html>